home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
gfx
/
edit
/
AmiCAD_2.07.lha
/
AmiCAD
/
ARexx
/
BoîteArrondie.AmiCAD
< prev
next >
Wrap
Text File
|
2000-11-03
|
1KB
|
43 lines
/* Tracé d'une boîte aux coins arrondis */
/* Version 1.00: 13 avril 1999
Version 1.01: 13 avril 2000 (modif GETZONE et SAVEALL)
Version 1.02: 3 novembre 2000 (localisation anglais/français)
$VER: 1.02 (© R.Florac, 3 novembre 2000) */
options results /* indispensable pour récupérer le résultat des macros */
signal on error /* pour l'interception des erreurs */
signal on syntax
'LANGUAGE'
if result='français.language' then fr=1
else fr=0
if fr=1 then 'GETZONE("Dessinez la boîte avec la souris")'
else 'GETZONE("Draw the box with the mouse")'
c=result
if c="" then exit
if fr=1 then 'ASKNUM("Rayon des angles?",10)'
else 'ASKNUM("Angles radius ?",10)'
angle=result
if angle="" then exit
parse var c x0 ',' y0 ',' x1 ',' y1
'DEF BOXR(X,Y,Z,W,R)=M__=DRAWMODE(-1):GROUP(ARC(X+R,Y+R,R,R,-90,0),DRAW(X+R,Y,Z-R,Y),ARC(Z-R,Y+R,R,R,0,90),DRAW(Z,Y+R,Z,W-R),ARC(Z-R,W-R,R,R,90,180),DRAW(Z-R,W,X+R,W),ARC(X+R,W-R,R,R,180,270),DRAW(X,Y+R,X,W-R)):DRAWMODE(M__)'
'SAVEALL:BOXR('c','angle')'
exit
/* Traitement des erreurs, interruption du programme */
syntax:
erreur=RC
if fr=1 then 'MESSAGE("Erreur de syntaxe"+CHR(10)+"en ligne 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
else 'MESSAGE("Syntax error"+CHR(10)+"in line 'SIGL'"+CHR(10)+"'errortext(erreur)'")'
exit
error:
if fr=1 then 'MESSAGE("Erreur en ligne 'SIGL'")'
else 'MESSAGE("Error in line 'SIGL'")'
exit